Những câu hỏi liên quan
Tùng anh
Xem chi tiết
Thế Thôi
26 tháng 4 2022 lúc 20:49

program b1;
uses crt;
var i,n,dat,chuadat:integer;
a:array[1..100] of integer;
begin
clrscr;
write('Nhap tong so ban trong lop:');
readln(n);
for i:=1 to n do  readln(a[i]);
dat:=0; chuadat:=0;
for i:=1 to n do
begin
if (a[i]>=5) then inc(dat);
if (5>=a[i]) then inc(chuadat);
end;
writeln('So hoc sinh dat la:',dat);
writeln('So hoc sinh chuadat la:',chuadat);
readln;
end.

Tham khao!

Bình luận (0)
Tùng anh
26 tháng 4 2022 lúc 20:50

Phần xổ số miên là mình viết nhầm

Nó là: xử dụng biến mảng nha

Bình luận (1)
Toản
Xem chi tiết
Uyên Nguyễn Ngọc Nhã
Xem chi tiết
Nguyễn Lê Phước Thịnh
4 tháng 4 2022 lúc 7:13

uses crt;

var a,b,c,tb:array[1..10]of real;

ln,nn:real;

i:integer;

begin

clrscr;

for i:=1 to 10 do readln(a[i],b[i],c[i]);

for i:=1 to 10 do 

  tb[i]:=(a[i]+b[i]+c[i])/3;

ln:=0;

nn:=10;

for i:=1 to 10 do 

  begin

if ln<tb[i] then ln:=tb[i];

if nn>tb[i] then nn:=tb[i];

end;

writeln(ln:4:2);

writeln(nn:4:2);

for i:=1 to 10 do 

 begin

if tb[i]>=5 then writeln('Ban thu ',i,' Dat')

else writeln('Ban thu ',i,'Chua dat');

end;

readln;

end.

Bình luận (0)
eeedddd
Xem chi tiết
Nguyễn Hoàng Đan
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 12 2021 lúc 15:09

#include <bits/stdc++.h>

using namespace std;

double a,b;

int main()

{

cin>>a>>b;

double tb=(a+b)/2;

if (tb>=5) cout<<"ket qua dat";

else cout<<"ket qua khong dat";

return 0;

}

Bình luận (1)
15 Nguyễn Hoàng gia huy
Xem chi tiết
Nguyễn Lê Phước Thịnh
28 tháng 2 2022 lúc 18:48

uses crt;

var a:array[1..100]of real;

i,n,dem1,dem2,dem3,dem4:integer;

begin

clrscr;

readln(n);

for i:=1 to n do readln(a[i]);

dem1:=0;

dem2:=0;

dem3:=0;

dem4:=0;

for i:=1 to n do 

  begin

 if (a[i]>=8) then inc(dem1);

if (6.5<=a[i]) and (a[i]<=7.9) then inc(dem2);

if (5<=a[i]) and (a[i]<=6.4) then inc(dem3);

if (a[i]<5) then inc(dem4);

end;

writeln('So hoc sinh gioi la: ',dem1);

writeln('So hoc sinh kha la: ',dem2);

writeln('So hoc sinh trung binh la: ',dem3);

writeln('So hoc sinh kem la: ',dem4);

readln;

end.

Bình luận (0)
Lê thị Phương  anh
Xem chi tiết
Phía sau một cô gái
5 tháng 5 2023 lúc 20:45

n = int(input("Nhập số lượng học sinh trong lớp: "))

dtb = [ ]

for i in range(n):

      diem = float(input(f"Nhập điểm trung bình của học sinh thứ {i+1}: "))

      dtb.append(diem)

count = 0

for diem in dtb:

      if diem < 5:

            count += 1

print(f"Số lượng học sinh xếp loại chưa đạt là: {count}")

Bình luận (0)
Trịnh Uyển Nhi
Xem chi tiết
Hương Phạm
Xem chi tiết
Nguyễn Lê Phước Thịnh
19 tháng 12 2021 lúc 23:46

 

 

#include <bits/stdc++.h>

using namespace std;

double a,b,c,tb;

int main()

{

cin>>a>>b>>c;

tb=(a+b+c)/3;

cout<<fixed<<setprecision(1)<<tb<<endl;

if (tb>=8) cout<<"Gioi";

else if ((6.5<=tb) and (tb<8)) cout<<"Kha";

else if ((5<=tb) and (tb<=6.5)) cout<<"Trung Binh";

else cout<<"Chua dat";

return 0;

}

Bình luận (0)
Hồ Thị Thủy Tiên
Xem chi tiết
Luân Đào
1 tháng 1 2021 lúc 16:13

var t,dt,a,tb: real;

begin

write('Nhap diem mon Toan: '); readln(t);

write('nhap diem mon Tin: '); readln(dt);

write('Nhap diem mon Anh: '); readln(a);

if (a<=0) or (a>=10) or (t<=0) or (t>=10) or (dt<=0) or (dt>=10) then

repeat

writeln('Khong hop le, nhap lai: ');

write('Nhap diem mon Toan: '); readln(t);

write('nhap diem mon Tin: '); readln(dt);

write('Nhap diem mon Anh: '); readln(a);

until (a>=0) and (a<=10) and (t>=0) and (t<=10) and (dt>=0) and (dt<=10);

tb:=(t+dt+a)/3;

writeln('Diem trung binh: ',tb:2:1);

if (dt>=6.5) and (t>=6.5) and (a>=6.5) and (tb>=8) then writeln('Gioi') else

if (dt>=5) and (t>=5) and (a>=5) and (tb>=6.5) then writeln('Kha') else writeln('Trung binh');

end.

Bình luận (0)
Nguyễn Lê Phước Thịnh
2 tháng 1 2021 lúc 9:18

uses crt;

var toan,tin,anh,tb:real;

kt:integer;

begin

clrscr;

repeat

write('Nhap diem Toan:'); readln(toan);

write('Nhap diem Tin:'); readln(tin);

write('Nhap diem Anh:'); readln(anh);

until (0<=toan) and (toan<=10) and (0<=tin) and (tin<=10) and (0<=anh) and (anh<=10);

tb:=(toan+tin+anh)/3;

writeln('Diem trung binh cua 3 mon la: ',tb:4:2);

kt:=0;

if (tb>=8) and (toan>=6.5) and (tin>=6.5) and (anh>=6.5) then kt:=1;

if (6.5<=tb) and (tb<8) and (5<=toan) and (toan<6.5) and (5<=tin) and (tin<6.5) and (5<=anh) and (anh<6.5) then kt:=2;

if kt=0 then writeln('Hoc sinh trung binh');

if kt=1 then writeln('Hoc sinh gioi');

if kt=2 then writeln('Hoc sinh kha');

readln;

end.

Bình luận (0)